#pragma once
#include <string>
#include "FeatureVectors.h"

class CNormalizationModule
{
public:
	CNormalizationModule(void);
	virtual ~CNormalizationModule(void);
	// build normalization data from a dataset, basically a vector of mean and stdDev values
	TDataSet CalculateNormalizationValues( TDataSet &data );
	// normalize a complete dataset
	TDataSet Normalize( TDataSet& data );
	// normalize a single point
	TFeatureVector Normalize( TFeatureVector& data );
	// are we ready to normalize?
	bool IsReady(void);
	// Load/Save normalization values
	bool Load( std::string name, std::string path );
	bool Save( std::string name, std::string path ); 
protected:
	std::string m_ext; 
	TFeatureVector m_means;
	TFeatureVector m_stdDev;
	TFeatureVector GetAllFeatures( TDataSet data, int feature );
	void CalculateAverages( TDataSet data, TFeatureVector& means, TFeatureVector& stdDev ); 
};
